<?php get_header(); 
?>
<?php
$tblog=$_GET["t"];
if($tblog=="blog"){
?>
<div class="container_12">
<div id="blogbody">
 <div class="grid_8" id="main">
  	<div class="grid_8 alpha omega" id="posts">
<?php
	while (have_posts()) : the_post(); 
 ?>
 		<div class="grid_8 alpha omega post">
    	<div class="postdate">
        	<div class="month m-<?php the_time('m') ?>"><?php the_time('M') ?></div>
        	<div class="day d-<?php the_time('d') ?>"><?php the_time('d') ?></div>
        	<div class="year y-<?php the_time('Y') ?>"><?php the_time('Y') ?></div>
		</div>
  			<h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    		<p class="postdata"><?php _e('Post in','a16006');?>: <span class="post-category"><?php the_category( ","); ?></span> &#183; <span ><?php _e('Tags','a16006');?>:<?php the_tags('', ', ', ''); ?> &#183; <?php _e('Comments','a16006');?>:<?php comments_number('0', '1', '%'); ?></span>
    		</p>
    		<div class="grid_8 alpha omega content"><?php  the_content(); ?></div>
        </div>
<?php endwhile; ?>
    </div>
  <div class="grid_4 alpha previous-link"><?php previous_post_link('&laquo; %link (last)') ?></div>
  <div class="grid_4 omega next-link"><?php next_post_link('(new) %link &raquo;') ?></div>
  </div>
 <?php get_sidebar(); ?>
 </div>
 </div>
<?php
}else{ // no blog
?>
<div id="feature_back">
<div class="container_12">
<div class="grid_12" id="feature">
<?php $lastposts = lastFeature();
foreach($lastposts as $post) :
    setup_postdata($post);
	the_image('full','');
endforeach; ?>
</div>
</div>
</div>
<div class="container_12">
<div id="blogbody">
<div class="grid_12">
<div class="home_items">
 	<ul>
<?php dynamic_sidebar('home_items') ; ?>
</ul>
	</div>
</div>
</div>
</div>
<?php
}
get_footer(); 
?>


